package org.lab.xmlparser;
import org.lab.metricmodel.metricmessage;

import java.io.File;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

public class Parserxml {
	
	 public Document getDocument(String xmlFileName) throws DocumentException {
        SAXReader reader = new SAXReader();
        Document doc = reader.read(new File(xmlFileName));
        return doc;
    }
	 public Element getNode(Document d, String eleName) {
	        Element ele = (Element) d.selectSingleNode(eleName);
	        return ele;
	    }
	    



}